<input type="hidden" name="{$key}" id="{$fprefix}-{$key}" value="{$pv.data.$key}" />
<div class="heading">
    <label class="{$field.classes}" for="{$fprefix}-{$key}-listing">{$lang.$base_request.$key}</label>
        <div>
            <button aria-disabled="false" role="button" class="ui-button ui-state-default ui-corner-all holder-trigger ui-small ui-widget ui-button-text-only" data-key="{$key}" data-fprefix="{$fprefix}">
                <span class="sprite-icons sprite-table icon-holder"></span><span>Open Fields List</span>
            </button>
        </div>
</div>

<div class="clearfix  preview-wrapper">
    <div class="ui-form ui-widget">
        <div class="ui-widget-header">
            Form Preview
        </div>
        <ul id="{$fprefix}-{$key}-listing" class="ui-widget-content form-preview"></ul>
    </div>
</div>

<div id="{$fprefix}-{$key}-holder" class="ui-form field-holder" title="{$lang.$base_request.f_fields}">
    <div class="ff_accordion">
        {foreach $pv.data.ffields as $types} <h3><a href="#{$types@key}">{$types@key}</a></h3>
        <div>
            {foreach $types as $v}
            <div id="holder-{$fprefix}-{$key}-{$v@key}">
                <a href="#" data-fprefix="{$fprefix}" data-key="{$key}" class="field-adder" 
                data-id="{$v@key}" data-ff_name="{$v.ff_name}" data-ff_type="{$v.ff_type}" 
                data-ff_params="{$v.ff_params}" data-ff_required="{$v.ff_required}"> <span class="sprite-icons sprite-add icon-holder"></span></a>{$v.ff_name}
                {if $v.ff_required eq "1"} <span class="sprite-icons sprite-bullet_red"></span>
                {/if}
            </div>
            {/foreach}
        </div>
        {/foreach}
    </div>
</div>


